package com.pi.base.util;

public class SysValidUtil {

	public static String validLogin(String userName,String password){
		String mess = validStr(userName,"用户名");
		mess = (mess.length() == 0) ? validStr(password,"密码") : mess;
		return mess;
	}
	
	public static String validPwdUpdate(String newPwd,String oldPwd){
		String mess = validStr(oldPwd,"旧密码");
		mess = (mess.length() == 0) ? validStr(newPwd,"新密码") : mess;
		return mess;
	}
	
	
	public static String validStr(String str,String name){
		if(ValidUtil.isBlank(str)){
			return "请输入"+name;
		}
		return "";
	}
	
}
